
package com.spring.redis.operation.serializer;

import org.nustaq.serialization.FSTConfiguration;

/**
 * 使用fts进行序列化
 *
 * @author zhouyu
 */
public class FstSerializer {

    private static class InstanceHolder {
        private static final FSTConfiguration INSTANCE = FSTConfiguration.createDefaultConfiguration();

        static {
            INSTANCE.setStreamCoderFactory(new FstDefaultStreamCoderFactory(INSTANCE));
        }
    }

    public FSTConfiguration getConfig() {
        return InstanceHolder.INSTANCE;
    }
}
